var app = getApp();
Page({
  data: {
    markers: [{
      iconPath: "/image/park.png",
      id: 0,
      latitude: 25.0821785206,
      longitude: 102.6569366455,
      width: 40,
      height: 48,
    }, {
      iconPath: "/image/park.png",
      id: 1,
      latitude: 25.0823145601,
      longitude: 102.6563519239,
      width: 40,
      height: 48,
    }, {
      iconPath: "/image/park.png",
      id: 1,
      latitude: 25.0780000901,
      longitude: 102.6586639881,
      width: 40,
      height: 48,
    }, {
      iconPath: "/image/park.png",
      id: 1,
      latitude: 25.0782624609,
      longitude: 102.6556384563,
      width: 40,
      height: 48,
    }],
    polyline: [{
      points: [{
        longitude: 102.6569366455,
        latitude: 25.0821785206
      }, {
        longitude: 102.6569366455,
        latitude: 23.21229
      }],
      color: "#FF0000DD",
      width: 2,
      dottedLine: true
    }]
  },
  onLoad: function(e) {

  },
  regionchange(e) {
    console.log(e)
  },
  markertap(e) {
    console.log(e.markerId)
  },
  controltap(e) {
    console.log(e.controlId)
  },
  bindParkingListItemTap: function() {
    wx.navigateTo({
      url: "../detail/detail"
    })
  },
  openParkingMap: function() {
    wx.navigateTo({
      url: '../parkinglotMap/parkinglotMap',
      success: function(res) {
        // success
      },
      fail: function(res) {
        // fail
      },
      complete: function(res) {
        // complete
      }
    })
  },
  onPullDownRefresh: function() {
    wx.stopPullDownRefresh;
  }
})